/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：BigEventScreen.java <br>
 * 创建时间：2014-3-2 下午4:24:26 <br>
 * 所属项目：GmudEX <br>
 * @author 12548 <br>
 */
package lostland.gmud.exv2.expand;

import lostland.gmud.exv2.FontSize;
import lostland.gmud.exv2.Gmud;
import lostland.gmud.exv2.blgframework.CScreen;
import lostland.gmud.exv2.blgframework.impl.BLGGraphics;
import lostland.gmud.exv2.ui.core.FullScreen;

/**
 * 类名：BigEventScreen <br>
 * 说明：
 *
 * @author 12548
 */
public class BigEventScreen extends FullScreen {

	String text;
	boolean splited;
	String title = "";
	CScreen ts;


	public BigEventScreen(String title, String text, boolean splited, CScreen s) {
		super();
		this.title = title;
		this.text = text;
		this.splited = splited;
		ts = s;
	}


	public BigEventScreen(String text, boolean splited, CScreen s) {
		super();
		this.text = text;
		this.splited = splited;
		ts = s;
	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.core.DialogScreen#onClick(int, int)
	 */
	@Override
	protected void onClick(int tx, int ty) {
		if (ts == null)
			getGame().popScreen();
		else
			ts.replaceCurrent();
	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.blgframework.CScreen#present(float)
	 */
	@Override
	public void present(float deltaTime) {
		BLGGraphics g = (BLGGraphics) getGame().getGraphics();
		g.clear(Gmud.getBgColor());
		g.drawRectOutline(63, 31, 216, 130, 0);
		g.drawText(title, 80, 48, FontSize.FT_16PX);
		if (splited)
			g.drawSplitedText(text, 70, 70, FontSize.FT_12PX);
		else
			g.drawText(text, 70, 70, FontSize.FT_12PX, 181);

	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.core.DialogScreen#onTouchDown(int, int)
	 */
	@Override
	protected void onTouchDown(int tx, int ty) {

	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.core.DialogScreen#onTouchMove(int, int)
	 */
	@Override
	protected void onTouchMove(int tx, int ty) {

	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.core.DialogScreen#onTouchUp(int, int)
	 */
	@Override
	protected void onTouchUp(int tx, int ty) {

	}


}
